Relational Queries Computable in Polynomial Time
نویسنده
چکیده
We characterize the polynomial time computable queries as those ex pressible in relational calculus plus a least xed point operator and a total ordering on the universe We also show that even without the ordering one application of xed point su ces to express any query expressible with several alternations of xed point and negation This proves that the xed point query hierarchy suggested by Chandra and Harel collapses at the rst xed point level It is also a general result showing that in nite model theory one application of xed point su ces Introduction and Summary Query languages for relational databases have received considerable attention In Codd showed that two natural languages for queries one algebraic and the other a version of rst order predicate calculus have identical powers of expressibility Cod Query languages which are as expressive as Codd s Relational Calculus are sometimes called complete This term is misleading however because many interesting queries are not expressible in complete languages In Aho and Ullman AU noted that relational calculus does not su ce to express the transitive closure property They suggested adding a least xed point operator to relational calculus in order to create a query language which can express transitive closure In Chandra and Harel CH b studied the expressive power of relational calculus with added primitives such Research supported by NSF Grant MCS and by an NSF postdoctoral fellowship A preliminary version of this paper appeared in th ACM STOC Symp as a least xed point operator They de ne a Fixed Point Hierarchy of query classes the queries in each particular class being those expressible with a certain number of applications of the least xed point operator followed by a certain number of alternations of of ordinary quanti cation and negation In this paper we show Theorem The Fixed Point Hierarchy collapses at the rst xed point level That is any query expressible with several applications of least xed point can already be expressed with one We also show Theorem Let L be a query language consisting of relational calculus plus the least xed point operator Suppose that L contains a relation symbol for a total ordering relation on the domain e g lexicographic ordering Then the queries expressible in L are exactly the queries computable in polynomial time Theorem was discovered independently by M Vardi Va It gives a syn tactic categorization of those queries which can be answered in polynomial time Of course queries requiring polynomial time in the size of the database are usu ally prohibitively expensive We also consider weaker languages for expressing less complex queries Background and Notation This section will brie y de ne and give examples of the objects under con sideration The reader is referred to Ull End AHU and Mo for excellent discussions of relational query languages rst order predicate calculus computational complexity and least xed points respectively First a relational database B hU R R ak k c csi is simply a rst order structure with nite universe U For i k Ri i is an ai ary relation on U i e Ri Ui The superscripts ai will be omitted where confusion does not arise The constants c cs are elements of U As an example we can consider a database B hU F P H Abrahami where U is a nite set of people U fAbraham Isaac Sarah Leah g F is a monadic relation true of the female elements of U
منابع مشابه
Queries and Algorithms Computable by Polynomial Time Existential Reeective Machines Extended Abstract for Pods'97 Submission
We consider two kinds of reeective relational machines: the usual ones, which use rst order queries, and existential reeective machines, which use only rst order existential queries. We compare these two computation models. We build on already existing results for standard relational machines, obtained by Abiteboul, Papadimitriou and Vianu APV], so we prove only results for existential machines...
متن کاملDeclarative PTIME Queries for Relational Databases using Quantifier Elimination
In this paper, we consider the problem of expressing and computing queries on relational deductive databases in a purely declarative query language, called SHQL (Semi-Horn Query Language). Assuming the relational databases in question are ordered, we show that all SHQL queries are computable in PTIME (polynomial time) and the whole class of PTIME queries is expressible in SHQL. Although similar...
متن کاملOracles that Compute Values
This paper focuses on complexity classes of partial functions that are computed in polynomial time with oracles in NPMV, the class of all multivalued partial functions that are computable nondeterministically in polynomial time. Concerning deterministic polynomial-time reducibilities, it is shown that 1. a multivalued partial function is polynomial-time computable with k adaptive queries to NPM...
متن کاملOn Using Oracles That Compute Values
This paper focuses on complexity classes of partial functions that are computed in polynomial time with oracles in NPMV, the class of all multivalued partial functions that are computable nondeterministically in polynomial time. Concerning deterministic polynomial-time reducibilities, it is shown that 1. A multivalued partial function is polynomial-time computable with k adaptive queries to NPM...
متن کاملLinearization and Completeness Results for Terminating Transitive Closure Queries on Spatial Databases
We study queries to spatial databases, where spatial data are modelled as semialgebraic sets, using the relational calculus with polynomial inequalities as a basic query language. We work with the extension of the relational calculus with terminating transitive closures. The main result is that this language can express the linearization of semi-algebraic databases. We also show that the sublan...
متن کاملBounded Queries to SAT and the
We study the complexity of decision problems that can be solved by a polynomial-time Turing machine that makes a bounded number of queries to an NP oracle. Depending on whether we allow some queries to depend on the results of other queries, we obtain two (probably) diierent hierarchies. We present several results relating the bounded NP query hierarchies to each other and to the Boolean hierar...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Information and Control
دوره 68 شماره
صفحات -
تاریخ انتشار 1986